// function searchXiaoJieJie(age:number):string{
// 	return '找到了' + age + '岁的小姐姐'
// }

// var age:number = 29;

// var result = searchXiaoJieJie(age)

// console.log(result)


// var result = function(age):string {
// 	return '找不到' + age + '岁的老阿姨';
// }

// console.log(result(age))


//有可选参数
// function searchDaJieJie(age:number, stature?:string):string{
// 	let yy:string = ""
// 	yy = '找到了' + age + '岁'
// 	if(stature != undefined){
// 		 yy = yy + stature
// 	}
// 	return yy + '小姐姐'
// }

// var result:string = searchDaJieJie(22,'大长腿')
// var stature:string = searchDaJieJie(22,'s型')

// console.log(result,'-------------------',stature)


//有默认参数
// function searchPangJieJie(age:number=18, stature:string='水桶腰'):string{
// 	let yy:string = ""
// 	yy = '找到了' + age + '岁'
// 	yy = yy + stature
// 	return yy + '的胖姐姐'
// }

// var pang:string = searchPangJieJie(22,'水蛇腰')

// console.log(pang)


//有剩余参数的函数
function searchXiaoJieJie3(...xuqiu:any[]):string{    //...xuqiu:(number | string)[]
    
    let  yy:string = '找到了'
    for (let i =0;i<xuqiu.length;i++){
        yy = yy + xuqiu[i]
        if(i<xuqiu.length - 1){
            yy=yy+'、'
        }
    }
    yy=yy+'的小姐姐'
    return yy

}

var result:string  =  searchXiaoJieJie3(22,'大长腿','瓜子脸','水蛇腰')
console.log(result)